package top.wardyan.wdev.dbdevassist.service.impl;

import top.wardyan.base.service.impl.ServiceImpl;
import top.wardyan.wdev.dbdevassist.model.YTLog;
import top.wardyan.wdev.dbdevassist.service.IYTLogService;

public class YTLogServiceImpl extends ServiceImpl<YTLog> implements IYTLogService{

	public YTLogServiceImpl(YTLog dao) {
		super(dao);
	}
	
	
	@Override
	protected YTLog initPrimaryKey(YTLog obj) {
		return obj;
	}

	@Override
	protected java.util.List<YTLog> initPrimaryKey(java.util.List<YTLog> objs) {
		return objs;
	}

	@Override
	public boolean saveOrUpdate(YTLog obj) {
		if(obj != null && this.findByIDs(obj.getSID()) != null) {
			return this.update(obj);
		}else {
			return this.save(obj);
		}
	}
}
